/*
 * Copyright 2016 Wealth Inc. All rights reserved.
 */
 package com.wealth.member.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import com.wealth.member.entity.Address;

import iaas.repository.BaseRepository;

/**
 * @author chan
 */
 @Repository
public interface AddressDao extends BaseRepository<Address, Long> ,JpaSpecificationExecutor<Address>{
	 
	List<Address> findByCorpIdAndStatus(Long corpid,Integer status);
	
	/** 查询 会员+状态不等于 */
	List<Address> findByMemberIdAndStatusNotOrderByIsDefaultDesc(Long memberid,Integer status);
	
	/** 查询 会员+状态+默认 */
	List<Address> findByMemberIdAndStatusAndIsDefault(Long memberid,Integer status, Integer iDefault);
	
	//查询是否是第一创建收货地址
	public List<Address> findByMemberId(Long memberid);
}

